<%--
  Created by IntelliJ IDEA.
  User: 16505
  Date: 2020/2/16
  Time: 16:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<%--下面两个效果等价--%>
<%--指令，页面转换期间，文件的实际内容合并为一个--%>
<%@include file="date.jsp" %>
<%--动作，请求期间，文件的内容是两个--%>
<jsp:include page="date.jsp" flush="false"/>


<%--下面两个效果等价--%>
<jsp:forward page="date.jsp">
    <jsp:param name="test" value="testvalue"/>
</jsp:forward>
<%
    request.setAttribute("test", "testvalue");
    request.getRequestDispatcher("date.jsp").forward(request, response);
%>


<jsp:useBean id="examPO" class="cn.jkgly.exam.entity.SjxxBean" scope="session"/>
<jsp:setProperty name="examPO" property="hyid" value="123"/>
<%
    session.setAttribute("exam1", examPO);
%>
<%
    String temp = ((cn.jkgly.exam.entity.SjxxBean) session.getAttribute("exam1")).getJgfs();
%>

<%
    Cookie cookie = new Cookie("test", "value");
    response.addCookie(cookie);

    Cookie[] tests = request.getCookies("test");

    String test = cookie.getValue("test");
%>
</body>
</html>
